         <g:form action="coursesetSave" method="post" name="teacherCourseSet">

            <g:hiddenField name="searchFlag" value="${params.searchFlag}"/> 
            <g:hiddenField name="teacherID" value="${teacherInstance?.id}"/>
            <div class="dialog">
                <table>
                    <tbody> 
                           <tr  >
                            <td valign="top" class="name">
                            </td>
                            <td valign="top"  style="font-size: 14px;line-height: 200%;">
                             <g:checkBox name="courseSelect" value="~" checked="true" style="display:none;"/>
                             <ul>
                                   <g:each in="${courselst}" status="i" var="aCourse">
                                        <%def f = haveCourse.any {aCourse.code == it}%>
                                        <li>${aCourse.value} <g:checkBox class="checkbox" name="courseSelect" value="${aCourse.code}" checked="${f}"/>
                             </g:each>
                             </ul>
          
                            </td>
                        </tr> 
                    </tbody>
                </table>
            </div> 
         <div class="buttons">
            <span class="button"><g:submitButton name="create" class="save" value="${message(code: 'default.button.create.label', default: 'Create')}" /></span>
         </div>
         </g:form>
